package com.szeldon.pj.jps.qres;

public class BinderResult extends AbstractQueryResult {
	private String name;

	private AbstractQueryResult value;

	/**
	 * 
	 * @param name
	 * @param value
	 */
	public BinderResult(String name, AbstractQueryResult value) {
		this.name = name;
		this.value = value;
	}

	@Override
	public String toString() {
		return "binder(name=" + name + ", value=" + value + ")";
	}

	public String getName() {
		return name;
	}

	public AbstractQueryResult getValue() {
		return value;
	}

	@Override
	public int compareTo(AbstractQueryResult result) {

		throw new IllegalStateException("BinderResult can't be compared with " + result.getClass().getName()
				+ " result.");
	}

}
